﻿using ClothingShopping.Data;
using ClothingShopping.Dto;
using ClothingShopping.Dto.AccountDto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ClothingShopping.IService
{
    public interface IUserService
    {
        /// <summary>
        ///注册用户
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        Task<IResultOutput> AddUserAsync(User user);
        /// <summary>
        /// 修改用户信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        Task<IResultOutput> UpdateUserAsync(UserDto userDto);
        /// <summary>
        /// 删除用户
        /// </summary>
        /// <param name="id">指定用户id</param>
        /// <returns></returns>
        Task<IResultOutput> DeleteUserAsync(int id);
        /// <summary>
        /// 查找用户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<User> GetUserByIdAsync(int id = 0, string? userName = null);

        /// <summary>
        /// 登录
        /// </summary>
        /// <param name="loginInputDto"></param>
        /// <returns></returns>
        Task<IResultOutput> LoginAsync(string login_name, string pwd);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="changePwdInputDto"></param>
        /// <returns></returns>
        Task<IResultOutput> ChangePassword(ChangePwdInputDto changePwdInputDto);
    }
}
